<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>编辑收货地址</title>
    <link rel="stylesheet" th:href="@{/bootstrap/css/bootstrap.min.css}">
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
    <style>
      form{
        margin: 100px auto;
      }
      textarea{
        width: 100%;
      }
    </style>
</head>
<body>
    <div th:insert="~{public/publicTop::top}"></div>
    <form class="form-horizontal" th:action="@{/account/update}" method="post">
        <input type="hidden" name="id" th:value="${address.getId()}">
        <div class="form-group">
            <label for="name" class="col-sm-2 control-label">收货人</label>
            <div class="col-sm-8">
                <input type="text" class="form-control" id="name" name="name" th:value="${address.getName()}">
            </div>
        </div>
        <div class="form-group">
            <label for="phone" class="col-sm-2 control-label">电话号码</label>
            <div class="col-sm-8">
                <input type="text" class="form-control number" id="phone" name="phone" th:value="${address.getPhone()}">
            </div>
        </div>
        <div class="form-group">
            <label for="longAddress" class="col-sm-2 control-label">地址</label>
            <div class="col-sm-8">
                <textarea  id="longAddress" cols="30" rows="10"  name="address" th:text="${address.getAddress()}"></textarea>
            </div>
        </div>
        <div class="form-group">
          <div class="col-sm-offset-2 col-sm-8">
            <button type="submit" class="btn btn-default btn btn-success">保存</button>
          </div>
        </div>
      </form>
      <script>
        var num = document.querySelector('.number');
      </script>
</body>
</html>